package org.shushan.web.demo.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import org.shushan.framework.core.condition.ConditionKeyword;
import org.shushan.framework.core.condition.ConditionOn;
import org.shushan.framework.core.condition.MultiConditionOn;
import org.shushan.framework.core.condition.ext.ConditionOnLike;
import org.shushan.framework.core.condition.ext.ConditionOnLikeLeft;
import org.shushan.framework.core.page.PageVo;
import org.shushan.web.demo.response.MongoTestVo;

import java.io.Serializable;

/**
 * (TUser)查询参数实体
 * @author zhigang.li
 * @email 2429967859@qq.com
 * @since 2023-09-16 22:25:41
 */
@Getter
@Setter
@Schema(name = "MongoTestPage",description = "MongoTestPage分页对象")
public class MongoTestPage extends PageVo<MongoTestVo> implements Serializable {
    private static final long serialVersionUID = 357241028771644950L;
    @Schema(name = "id", description = "主键id")
    @ConditionOn(assemble = ConditionKeyword.OR_OPERATE)
    private Long id;
    @Schema(name = "traceId",description = "追踪id")
    private String traceId;
    @ConditionOnLikeLeft
    @Schema(name = "logContext",description = "日志上下文")
    private String logContext;
    @ConditionOnLike
    @Schema(name = "logRemark",description = "日志备注")
    private String logRemark;

    @MultiConditionOn(value = {
            @ConditionOn(column = "log_remark", value = ConditionKeyword.LIKE),
            @ConditionOn(column = "log_context", value = ConditionKeyword.LIKE
            )}, assemble = ConditionKeyword.OR_OPERATE)
    @Schema(name = "多字段查询", description = "日志备注和上下文")
    private String logRemarkAndContext;


}

